<?php 
//check if domain exist on $_GET URL
if($_GET["domain"]){$selectDomain=$_GET["domain"];}

$qDomains=mysql_query("SELECT domain from domains ORDER BY domain ASC");
while($domain = mysql_fetch_array($qDomains))
{
	echo "<option value='$domain[0]'";
	if($domain[0] == $selectDomain){echo "selected ";}
	echo ">$domain[0]</option>";
}
?>
